package com.el.springboot.mapper;

import com.el.springboot.controller.dto.UserPasswordDTO;
import com.el.springboot.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author el
 * @since 2023-03-19
 */
//@Mapper//已经用了mybatis-plus扫描
@Repository(value ="UserMapper")
public interface UserMapper extends BaseMapper<User> {


    @Update("update sys_user set password = #{newPassword} where username = #{username} and password = #{password}")
    int updatePassword(UserPasswordDTO userPasswordDTO);



}
